let fs=require('fs')
let path=require('path')
let http=require('http')
let url=require('url')
http.createServer((req,res)=>{
    if(req.url==='favicon.ico') return;

    

    if(req.url==='/'){
        res.end(fs.readFileSync(path.join(__dirname, './index1.html')))
    }
    if(req.url==='/a'){
        res.end(fs.readFileSync(path.join(__dirname, './index.html')))
    }
    let pathname=url.parse(req.url).pathname
    if(pathname==='/log'){
        let data=url.parse(req.url,true).query;
        
        console.log(data.inp,data.pwd);
        res.end('123')
        
    }
}).listen(8000)